<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% block title %}
    {% endblock %}
    <link rel="stylesheet" href="{{ url_for('static',filename='plugins/fontawesome-free/css/all.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/adminlte.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/common.css') }}">
    <script src="{{ url_for('static',filename='plugins/jquery/jquery.min.js') }}"></script>
    <script src="{{ url_for('static',filename='plugins/bootstrap/js/bootstrap.js') }}"></script>

    {% block ext_css %}
    {% endblock %}
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="#" class="nav-link">首页</a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
            <li class="nav-item">
                <a class="nav-link" data-widget="fullscreen" href="#" role="button">
                    <i class="fas fa-expand-arrows-alt"></i>
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
                    <i class="fas fa-th-large"></i>
                </a>
            </li>
        </ul>
    </nav>
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <a href="#" class="brand-link">
            <img src="{{ url_for('static',filename='img/AdminLTELogo.png' ) }}" alt="AdminLTE Logo"
                 class="brand-image img-circle elevation-3" style="opacity: .8">
            <span class="brand-text font-weight-light">图书管理系统</span>
        </a>
        <div class="sidebar">
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                <div class="image">
                    <img src="{{ url_for('static',filename='img/user2-160x160.jpg' )}}" class="img-circle elevation-2" alt="User Image">
                </div>
                <div class="info"><p>
{#                    <a>{% if request.user.is_authenticated %}#}
{#                        {{ request.user.username }}#}
{#                    {% else %}#}
{#                        未登录，非法#}
{#                    {% endif %}#}
{#                    </a>&nbsp;&nbsp;&nbsp;&nbsp;#}
                    <a href="{{url_for('logout')}}">退出</a></p>
                </div>
            </div>
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <li class="nav-header">书籍管理</li>
                        <li class="nav-item">
                            <a href="{{ url_for('pub_list') }}" class="nav-link">
                                <i class="nav-icon far fa-image"></i>
                                <p>
                                    出版社管理
                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{{url_for('author_list')}}" class="nav-link">
                                <i class="nav-icon far fa-image"></i>
                                <p>
                                    作者管理
                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{{url_for('book_list')}}" class="nav-link">
                                <i class="nav-icon far fa-image"></i>
                                <p>
                                    图书管理
                                </p>
                            </a>
                        </li>
                    <li class="nav-header">系统管理</li>
                        <li class="nav-item">
                            <a href="{{url_for('user_list')}}" class="nav-link">
                                <i class="nav-icon far fa-circle text-danger"></i>
                                <p class="text">用户管理</p>
                            </a>
                        </li>
                </ul>
            </nav>
        </div>
    </aside>
    {% block content %}
    {% endblock %}
    <br><br>
    <footer class="main-footer">
        <strong>Copyright &copy; 2014-2020 <a href="https://adminlte.io">AdminLTE.io</a>.</strong>
        All rights reserved.
        <div class="float-right d-none d-sm-inline-block">
            <b>Version</b> 3.1.0-rc
        </div>
    </footer>
    <aside class="control-sidebar control-sidebar-dark">
    </aside>
</div>
<script src="{{ url_for('static',filename='plugins/chart.js/Chart.min.js' ) }}"></script>
<script src="{{ url_for('static',filename='js/adminlte.js' ) }}"></script>
{% block ext_js %}
{% endblock %}
</body>
</html>